<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/shop/shop/ShopOrderList" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<input type="hidden" name="shopId" value="${requestScope.record.shopId}" />
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><p class="nowrap">
							<label>&emsp;店铺号：${requestScope.record.shopNum}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 150px;">&emsp;联系人：${requestScope.record.contacts}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 150px;">店铺状态：${requestScope.record.shopState == 0 ? '停用': ''} ${requestScope.record.shopState == 1 ? '启用': ''}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 150px;">&emsp;&emsp;地址：${requestScope.record.areaName}</label>
						</p></td>
				</tr>
				<tr>
					<td><p class="nowrap">
							<label style="width: 150px;">店铺名称：${requestScope.record.shopName}</label>
						</p></td>

					<td><p class="nowrap">
							<label style="width: 150px;">联系电话：${requestScope.record.contactNumber}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 150px;">门店状态：${requestScope.record.state == 1 ? '新客户': ''} ${requestScope.record.state == 2 ? '门店建设中': ''} ${requestScope.record.state == 3 ? '门店配货中': ''} ${requestScope.record.state == 4 ? '常规客户': ''} </label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 150px;">详细地址：${requestScope.record.address}</label>
						</p></td>
				</tr>
			</table>
			<!-- <div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div> -->
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/shop/shop/ShopOrderListexport">
				<li><a href="${pageContext.request.contextPath}/shop/shop/ShopOrderListexport" target="dwzExport" targetType="navTab" title="是要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/shop/shop/shoplist">
				<li><a target="navTab" title="客户列表" rel="${pageContext.request.contextPath}/shop/shop/shoplist" href="${pageContext.request.contextPath}/shop/shop/shoplist" class="goBackBtn" mask="true"><span>返回</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="210" orderField="ordernum" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ordernum'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单号</th>
				<th orderField="orderprocess" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'orderprocess'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单流程</th>
				<th orderField="ordermoney" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ordermoney'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单金额</th>
				<th orderField="receivablemoney" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'receivablemoney'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>应收金额</th>
				<th orderField="realmoney" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'realmoney'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>实收金额</th>
				<th orderField="paytime" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'paytime'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>支付时间</th>
				<th orderField="completetime" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'completetime'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>完成时间</th>
				<th orderField="shopname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'shopname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺名称</th>
				<th orderField="emname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'emname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单创建人</th>
				<th orderField="spname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'spname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>分店操作人</th>
				<th orderField="mename" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mename'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>总店操作人</th>
				<th orderField="memo"  width="150" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memo'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>备注</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr>
						<td>${record.ordernum}</td>
						<!-- 0新订单 1已受理 2待收货 6退款中 7已退货 8取消订单 9 完成 -->
						<td>${record.orderprocess == 0 ? '新订单': ''}${record.orderprocess == 1 ? '已受理': ''}${record.orderprocess == 2 ? '待收货': ''}${record.orderprocess == 6 ? '退款中': ''}${record.orderprocess == 7 ? '已退货': ''}${record.orderprocess == 8 ? '取消订单': ''}${record.orderprocess == 9 ? '完成': ''}</td>
						<td>${record.ordermoney*0.01}</td>
						<td>${record.receivablemoney*0.01}</td>
						<td>${record.realmoney*0.01}</td>
						<td><fmt:formatDate value="${record.paytime}" pattern="yyyy-MM-dd" /></td>
						<td><fmt:formatDate value="${record.completetime}" pattern="yyyy-MM-dd" /></td>
						<td>${record.shopname}</td>
						<td>${record.emname}</td>
						<td>${record.spname}</td>
						<td>${record.mename}</td>
						<td>${record.memo}</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>